package day04;
import java.util.Scanner;
public class Guessing {
    public static void main(String[] args) {
        Scanner scan= new Scanner(System.in);
        int a=(int) (Math.random()*1000+1);
        System.out.println("猜吧！");
        int guess= scan.nextInt();
        while (guess!=a){
            if (guess<a) {
                System.out.println("猜小了！请重新输入...");

            }
            else {
                System.out.println("猜大了!请重新输入...");
            }
                guess=scan.nextInt();

        }

        System.out.println("猜对了");
    }
}
